import { PokerCard } from "./card";

// 常规比较, 按照值大小比较, 如果第一个牌比第二个牌的值大, 返回true
function IsFirstCardValueBigger(card1: PokerCard, card2: PokerCard): boolean {
  return card1.GetValue() > card2.GetValue();
}

export function GetBigCard(card1: PokerCard, card2: PokerCard): PokerCard {
  return IsFirstCardValueBigger(card1, card1) ? card1 : card2;
}

export function GetSmallCard(card1: PokerCard, card2: PokerCard): PokerCard {
  return IsFirstCardValueBigger(card1, card1) ? card2 : card1;
}
